
LIBCRYPTO="`ls -1 usr/lib/libcrypto.so.* 2>/dev/null | head -n 1`"
if [ "$LIBCRYPTO" ];then
 LIBCRYPTO="`basename $LIBCRYPTO`"
 ln -s $LIBCRYPTO usr/lib/libcrypto.so.0
 ln -s $LIBCRYPTO usr/lib/libcrypto.so.0.9.7
 ln -s $LIBCRYPTO usr/lib/libcrypto.so.0.9.8
 ln -s $LIBCRYPTO usr/lib/libcrypto.so.1.0.0
else
 LIBCRYPTO="`ls -1 lib/libcrypto.so.* | head -n 1`"
 LIBCRYPTO="`basename $LIBCRYPTO`"
 ln -s $LIBCRYPTO lib/libcrypto.so.0
 ln -s $LIBCRYPTO lib/libcrypto.so.0.9.7
fi

LIBSSL="`ls -1 usr/lib/libssl.so.* 2>/dev/null | head -n 1`"
if [ "$LIBSSL" ];then
 LIBSSL="`basename $LIBSSL`"
 ln -s $LIBSSL usr/lib/libssl.so.0
 ln -s $LIBSSL usr/lib/libssl.so.0.9.7
 ln -s $LIBSSL usr/lib/libssl.so.0.9.8
 ln -s $LIBSSL usr/lib/libssl.so.1.0.0
else
 LIBSSL="`ls -1 lib/libssl.so.* | head -n 1`"
 LIBSSL="`basename $LIBSSL`"
 ln -s $LIBSSL lib/libssl.so.0
 ln -s $LIBSSL lib/libssl.so.0.9.7
fi
